package map;

import java.util.HashMap;
import java.util.Map;

public class MapDemo1 {
    public static void main(String[] args) {
        Map<String, Integer> map = new HashMap<>();
        Integer in = map.put("语文", 99);
        System.out.println(in);
        map.put("数学", 98);
        map.put("英语", 97);
        map.put("物理", 96);
        map.put("化学", 95);
        map.put("生物", 94);
        System.out.println(map);
        in = map.put("数学", 77);
        System.out.println(map);
        System.out.println(in);
        in = map.get("语文");
        System.out.println("语文:" + in);
        in = map.get("体育");
        System.out.println("体育:" + in);
        int size = map.size();
        System.out.println(size);
        in = map.remove("语文");
        System.out.println(map);
        System.out.println(in);
        boolean bl = map.containsKey("体育");
        System.out.println(bl);
    }
}
